Build new Linux Kernel via the CLI.

20 Dec

While trying to solve a persistant message in the console cifs vfs free previous_auth.response I came across a post which suggests a kernel update would resolve the issue.

Install requirements to build the kernel:

apt-get install build-essential libncurses5-dev bison flex libelf-dev ca-certificates bc libssl-dev

Download the kernel, extract, and import current configuration:

cd /tmp
wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.19.11.tar.xz
tar xvf linux-4.19.11.tar.xz
cd linux-4.19.11
cp -v /boot/config-$(uname -r) .config

Run this command, then exit, when prompted (saves a lot of questions during build process):

make menuconfig

Build and create deb packages:

make deb-pkg -j 4

Once complete; deb packages can be found in the directory immediately above:

  • linux-headers-4.19.11_4.19.11-1_amd64.deb
  • linux-image-4.19.11_4.19.11-1_amd64.deb
  • linux-image-4.19.11-dbg_4.19.11-1_amd64.deb
  • linux-libc-dev_4.19.11-1_amd64.deb

It should be noted the only file which needs to be installed is: linux-image-4.19.11_4.19.11-1_amd64.deb.

To install, simply run:

dpkg -i /tmp/linux-image-4.19.11_4.19.11-1_amd64.deb

Once you reboot, you can validate the new kernel is running via:

uname -r

5 thoughts on “Build new Linux Kernel via the CLI.

  1. Hi there to all, for the reason that I am genuinely keen of reading this website’s post to be updated on a regular basis. It carries pleasant stuff.

  2. You’re so awesome! I don’t believe I have read a single thing like that before. So great to find someone with some original thoughts on this topic. Really.. thank you for starting this up. This website is something that is needed on the internet, someone with a little originality!

Leave a Reply

Your email address will not be published.